import java.util.ArrayList;

public class ArrayListTest {
	public static void main(String[] args) {
		ArrayList list = new ArrayList();

		list.add("tom");
		list.add("jan");

		System.out.println(list.get(1));
		list.set(1, "kohn");

		System.out.println(list.get(1));

		// list.remove(1);
		System.out.println(list.get(1));

		System.out.println(list);

		System.out.println(list.size());

		for (int i = 0; i < list.size(); i++) {
			String name = (String) list.get(i);
			if (name.startsWith("j")) {
				System.out.println(list.get(i));
			}
		}
	}
}
